home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / tvdmx.exe / README.DOC < prev    next >
Text File  |  1992-07-16  |  39KB  |  988 lines

  1.  
  2.   tvDMX  version 1.5  (c) 1992  Randolph Beck
  3.   =====
  4.  
  5.   This is a shareware product and may be distributed and copied for free.
  6.  
  7.   Users must register their copy by sending $20 to:
  8.  
  9.                              Randolph Beck
  10.                              tvDMX Registration
  11.                              P.O. Box  56-0487
  12.                              Orlando, FL 32856-0487
  13.  
  14.   Please include any questions or comments.  Registered users will receive
  15.   a diskette with the most recent version and additional documentation.
  16.   Registered users of previous versions may upgrade to this version free.
  17.   CompuServe members may contact the author at CIS: 72361,753.
  18.  
  19.  
  20.  
  21.          Page 1.     tvDMX OVERVIEW                                                    
  22.                          Keystroke Philosophy
  23.  
  24.          Page 2.     tvDMX CONCEPTS                                                    
  25.                          The Data-Formatting Template
  26.  
  27.          Page 3.     USING tvDMX IN YOUR PROGRAMS                                      
  28.                          Data Windows
  29.                          Automatic Assignment Constructors
  30.                          Loading tvDMX Views from a Stream
  31.                          Using tvDMX as Field Editors
  32.  
  33.          Page 6.     ADVANCED FEATURES                                                 
  34.                          User Key Errors
  35.                          Hidden and Read-Only Fields
  36.                          Swapping Field Positions
  37.  
  38.          Page 7.     ASCENDANCY CHART                                                  
  39.  
  40.          Page 8.     UNITS                                                             
  41.  
  42.          Page 9.     DATA TEMPLATE CODES                                               
  43.                          Using Template Codes                    
  44.                          Template Control Codes
  45.  
  46.          Page 14.    FYI
  47.                          Important Virtual Methods
  48.                          External Database Access
  49.                          Global Functions in Units DMXGIZMA and tvGIZMA
  50.  
  51.          Page 17.    USER RESPONSE FORM                                                
  52.  
  53.   tvDMX OVERVIEW                                                      Page 1
  54.   ==============
  55.  
  56.   This project was originally undertaken to enable programmers to quickly
  57.   design a browse-like data entry screen which users could operate in a
  58.   natural and intuitive way.  It was completely redesigned for Turbo Vision.
  59.  
  60.   The object-oriented framework of tvDMX can be extended to access any form
  61.   of data structure (including dBASE files and Streams and Collections).
  62.  
  63.   tvDMX display formats use picture templates and grant the programmer full
  64.   control over the appearance of each field.
  65.  
  66.   Features:
  67.         *  programmable display formats for the major Pascal data types
  68.         *  containment within a Turbo Vision scrolling view
  69.         *  virtual methods provide maximum flexibility
  70.         *  record structure and display format can be set at run-time
  71.         *  hidden and read-only fields
  72.         *  field display position order can differ from physical order
  73.         *  reports can be generated for the data in views
  74.  
  75.   This document should give a quick introduction to tvDMX.  Rather than
  76.   detail the inner workings, I decided to provide four sample programs
  77.   which you can examine:
  78.  
  79.   SAMPLES.PAS displays several windows:  Each with data in various formats.
  80.     Most of the scrolling data windows has an accompanying dialog window
  81.     which can be selected by pressing the <F2> key.  This will give you an
  82.     idea of what tvDMX can do.
  83.  
  84.   WORKSHOP.PAS is intended for your own experiments.  It will give you an
  85.     idea of how easy it is to create a data window.  WORKSHOP was written
  86.     so that you can easily modify the data structure and display formats.
  87.  
  88.   FILESHOP.PAS manages data on disk via a TDosStream object --to show that
  89.     tvDMX operations are not limited to data in RAM.
  90.  
  91.   DLGSHOP.PAS demonstrates how to integrate a tvDMX view into a dialog box.
  92.  
  93.   COLLECTR.PAS demonstrates how to manage data in a collection.
  94.  
  95.   The source code for each of these programs contains additional information
  96.   about its use and features.
  97.  
  98.                              Keystroke Philosophy
  99.                              --------------------
  100.  
  101.   Most keys work as you would expect.  In addition:  kbCtrlT deletes the
  102.   current field, and kbCtrlY deletes the current record.
  103.  
  104.   The kbLeft and kbRight keys normally move the field pointer from one
  105.   field to another.  Movement within a character field is permitted:
  106.  
  107.       1) After a character is entered into the field;
  108.       2) after kbIns, kbCtrlT or kbCtrlY is pressed; or
  109.       3) anytime the keyboard is not in INSERT mode.
  110.  
  111.   tvDMX CONCEPTS                                                      Page 2
  112.   ==============
  113.  
  114.  
  115.                          The Data-Formatting Template
  116.                          ----------------------------
  117.  
  118.   The default appearance of these views is usually column/row oriented.
  119.   You declare a record structure for the DMX initialization procedure in
  120.   a template string --which also determines the display format.
  121.   (You will see later how tvDMX can be used for field editors.)
  122.  
  123.   A RECORD of STRING [20], INTEGER, and REAL may use this format:
  124.            ' ssssssssssssssssssss | iiii | ($rrr,rrr.rr) '
  125.  
  126.   And that would present a record in this way:
  127.            ' Daniel D. Demo       │  154 │  $ 12,056.55  '
  128.  
  129.   The template string in this example was entirely in lower case.  If in
  130.   upper case, character-fields would be entered in upper case and
  131.   numeric-fields would be restricted to positive values.
  132.  
  133.   The data TYPE of each field is determined by the characters in the string.
  134.   All primary Pascal data types are supported:  BOOLEAN, BYTE, SHORTINT,
  135.   INTEGER, LONGINT, WORD, STRING, CHAR, arrays of CHAR, and REAL.  The
  136.   programmer only needs to alter this one template string when changing the
  137.   data structure.  (Template codes are listed on the Reference page.)
  138.  
  139.   You can switch to SINGLE, DOUBLE or EXTENDED reals by changing TYPE
  140.   TREALNUM in RSET.PAS.
  141.  
  142.  
  143.   A backslash ('\') may be used as a field delimiter, and is displayed as a
  144.   space character.  (Other delimiters can be devised as well --please refer
  145.   to the ^D control code.)
  146.  
  147.   The tilde ('~') character can be used to switch format-processing on and
  148.   off.  This makes it possible to separate the text-literals from format and
  149.   control codes:
  150.  
  151.       ' ~Name:~ ssssssssssssssssssss\ ~SSN:~ ###-##-#### '
  152.  
  153.     This is diplayed as:
  154.       ' Name: Daniel D. Demo        SSN: 012-34-5678 '
  155.  
  156.   USING tvDMX IN YOUR PROGRAMS                                        Page 3
  157.   ============================
  158.  
  159.                                  Data Windows
  160.                                  ------------
  161.  
  162.   Presumably you understand that a focused TScroller is owned by, and
  163.   operates within, an active TWindow.  The TScroller also has several
  164.   peer-views:  a TFrame and two TScrollBars.  If you wished, you could add
  165.   more views to display additional information.  This is how the
  166.   TDmxScroller object works, as well as its descendant TDmxEditor.
  167.  
  168.   (A TDmxScroller object displays data in a scrolling window, and a
  169.   TDmxEditor object adds the ability to edit the data.)
  170.  
  171.   Programmers can instantiate a TWindow view and insert a TDmxEditor object
  172.   just like using TScroller --with a few extra parameters. Then, for an
  173.   effective data window, field titles should be placed at the top, and a
  174.   record number indicator should be placed below.
  175.  
  176.   The TDmxWindow object (a descendant of TWindow) coordinates the entire
  177.   process of inserting these extra views.
  178.  
  179.   Initialization Syntax:
  180.  
  181.       constructor TDmxWindow.Init (
  182.                    var Bounds    : TRect;
  183.                        ATitle    : TTitleStr;
  184.                        ANumber   : Integer;
  185.                        ATemplate : String;
  186.                    var AData;
  187.                        BSize     : LongInt;
  188.                    var ALabels